/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


$(document).ready(function(){
    //sender ajax request til servlet for å få fylkelist
    $.ajax({
        type: "GET",
        url: "AjaxHandler",
        data: "mode=getprofilelist&type=lighting",
        dataType: "json",
        success: function(data){
            $('#idSlctProfileLight').append('<option></option>');
            $.each(data, function(key,value){
                $('#idSlctProfileLight').append('<option id=\"idFylke'+key+'\">'+value+'</option>');
            });
        },
        error: function(error){
            //TODO håndtere feil her
        }
    });
});
$(document).ready(function(){
    //sender ajax request til servlet for å få fylkelist
    $.ajax({
        type: "GET",
        url: "AjaxHandler",
        data: "mode=getprofilelist&type=equip",
        dataType: "json",
        success: function(data){
            $('#idUsageProfilePickerEquip').append('<option></option>');
            $.each(data, function(key,value){
                $('#idUsageProfilePickerEquip').append('<option id=\"idFylke'+key+'\">'+value+'</option>');
            });
        },
        error: function(error){
            //TODO håndtere feil her
        }
    });
});